package com.leoman.dao;

import com.leoman.entity.Banner;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * 广告
 * Created by 涂奕恒 on 2016/10/18.
 */
public interface BannerDao extends JpaRepository<Banner, Integer>, JpaSpecificationExecutor<Banner> {

    @Query("select a from Banner a where a.videoId = ?1")
    List<Banner> findListByVideoId(Integer videoId);
}